3.5 \(\int \frac{\sec (x)}{a+a \csc (x)} \, dx\)

Optimal. Leaf size=33 \[ \frac{\sec ^2(x)}{2 a}+\frac{\tanh ^{-1}(\sin (x))}{2 a}-\frac{\tan (x) \sec (x)}{2 a} \]

[Out]

ArcTanh[Sin[x]]/(2*a) + Sec[x]^2/(2*a) - (Sec[x]*Tan[x])/(2*a)

________________________________________________________________________________________

Rubi [A]  time = 0.072992, antiderivative size = 33, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.546, Rules used = {3872, 2706, 2606, 30, 2611, 3770} \[ \frac{\sec ^2(x)}{2 a}+\frac{\tanh ^{-1}(\sin (x))}{2 a}-\frac{\tan (x) \sec (x)}{2 a} \]

Antiderivative was successfully verified.

[In]

Int[Sec[x]/(a + a*Csc[x]),x]

[Out]

ArcTanh[Sin[x]]/(2*a) + Sec[x]^2/(2*a) - (Sec[x]*Tan[x])/(2*a)

Rule 3872

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[((g*C
os[e + f*x])^p*(b + a*Sin[e + f*x])^m)/Sin[e + f*x]^m, x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rule 2706

Int[((g_.)*tan[(e_.) + (f_.)*(x_)])^(p_.)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[1/a, Int[S
ec[e + f*x]^2*(g*Tan[e + f*x])^p, x], x] - Dist[1/(b*g), Int[Sec[e + f*x]*(g*Tan[e + f*x])^(p + 1), x], x] /;
FreeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && NeQ[p, -1]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2611

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a*Sec[e
+ f*x])^m*(b*Tan[e + f*x])^(n - 1))/(f*(m + n - 1)), x] - Dist[(b^2*(n - 1))/(m + n - 1), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \frac{\sec (x)}{a+a \csc (x)} \, dx &=\int \frac{\tan (x)}{a+a \sin (x)} \, dx\\ &=\frac{\int \sec ^2(x) \tan (x) \, dx}{a}-\frac{\int \sec (x) \tan ^2(x) \, dx}{a}\\ &=-\frac{\sec (x) \tan (x)}{2 a}+\frac{\int \sec (x) \, dx}{2 a}+\frac{\operatorname{Subst}(\int x \, dx,x,\sec (x))}{a}\\ &=\frac{\tanh ^{-1}(\sin (x))}{2 a}+\frac{\sec ^2(x)}{2 a}-\frac{\sec (x) \tan (x)}{2 a}\\ \end{align*}

Mathematica [A]  time = 0.0249201, size = 17, normalized size = 0.52 \[ \frac{\frac{1}{\sin (x)+1}+\tanh ^{-1}(\sin (x))}{2 a} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[x]/(a + a*Csc[x]),x]

[Out]

(ArcTanh[Sin[x]] + (1 + Sin[x])^(-1))/(2*a)

________________________________________________________________________________________

Maple [A]  time = 0.044, size = 33, normalized size = 1. \begin{align*}{\frac{1}{2\,a \left ( \sin \left ( x \right ) +1 \right ) }}+{\frac{\ln \left ( \sin \left ( x \right ) +1 \right ) }{4\,a}}-{\frac{\ln \left ( \sin \left ( x \right ) -1 \right ) }{4\,a}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(x)/(a+a*csc(x)),x)

[Out]

1/2/a/(sin(x)+1)+1/4*ln(sin(x)+1)/a-1/4/a*ln(sin(x)-1)

________________________________________________________________________________________

Maxima [A]  time = 1.04997, size = 42, normalized size = 1.27 \begin{align*} \frac{\log \left (\sin \left (x\right ) + 1\right )}{4 \, a} - \frac{\log \left (\sin \left (x\right ) - 1\right )}{4 \, a} + \frac{1}{2 \,{\left (a \sin \left (x\right ) + a\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)/(a+a*csc(x)),x, algorithm="maxima")

[Out]

1/4*log(sin(x) + 1)/a - 1/4*log(sin(x) - 1)/a + 1/2/(a*sin(x) + a)

________________________________________________________________________________________

Fricas [A]  time = 0.483032, size = 117, normalized size = 3.55 \begin{align*} \frac{{\left (\sin \left (x\right ) + 1\right )} \log \left (\sin \left (x\right ) + 1\right ) -{\left (\sin \left (x\right ) + 1\right )} \log \left (-\sin \left (x\right ) + 1\right ) + 2}{4 \,{\left (a \sin \left (x\right ) + a\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)/(a+a*csc(x)),x, algorithm="fricas")

[Out]

1/4*((sin(x) + 1)*log(sin(x) + 1) - (sin(x) + 1)*log(-sin(x) + 1) + 2)/(a*sin(x) + a)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\sec{\left (x \right )}}{\csc{\left (x \right )} + 1}\, dx}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)/(a+a*csc(x)),x)

[Out]

Integral(sec(x)/(csc(x) + 1), x)/a

________________________________________________________________________________________

Giac [A]  time = 1.32379, size = 46, normalized size = 1.39 \begin{align*} \frac{\log \left (\sin \left (x\right ) + 1\right )}{4 \, a} - \frac{\log \left (-\sin \left (x\right ) + 1\right )}{4 \, a} + \frac{1}{2 \, a{\left (\sin \left (x\right ) + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)/(a+a*csc(x)),x, algorithm="giac")

[Out]

1/4*log(sin(x) + 1)/a - 1/4*log(-sin(x) + 1)/a + 1/2/(a*(sin(x) + 1))